package org.xxl.iso 
{
	import flash.display.Sprite;
	import flash.geom.Point;
	/**
	 * ...
	 * @author XXL
	 */
	public class IsoObject extends Sprite
	{
		public var depth:Number = 0;
		
		protected var _size:Number;
		protected var _position:Point3D;
		
		public function IsoObject(size:Number) 
		{
			this._size = size;
			this._position = new Point3D();
		}
		
		protected function updateScreenPosition():void
		{
			var screenPos:Point = IsoUtil.IsoToScreen(_position);
			super.x = screenPos.x;
			super.y = screenPos.y;
			
			depth = (_position.x + _position.z) * .866 - _position.y * .707;
		}
		
		public function set position(value:Point3D):void
		{
			_position = value;
			updateScreenPosition();
		}
		public function get position():Point3D
		{
			return _position;
		}
		
		public function render():void
		{
			
		}
	}

}